﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Xml.Linq;
using SqlSugar;

namespace WpfApp3.Models
{//数据模型
   


    public class Person : INotifyPropertyChanged
    {
        private string _name;
        private int _age;
        private string _characteristics;
        private string _political;
        private string _gender;
        private string _marital;
        private string _remarks;
        public string newperson;

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public string Name
        {
            get => _name;
            set { _name = value; OnPropertyChanged(); }
        }

        public int Age
        {
            get => _age;
            set { _age = value; OnPropertyChanged(); }
        }

        public string Political
        {
            get => _political;
            set { _political = value; OnPropertyChanged(); }
        }
        public string Characteristics
        {
            get => _characteristics;
            set { _characteristics = value; OnPropertyChanged(); }
        }
        public string Gender
        {
            get => _gender;
            set { _gender = value; OnPropertyChanged(); }
        }
        public string Marital
        {
            get => _marital;
            set { _marital = value; OnPropertyChanged(); }
        }
        public string Remarks
        {
            get => _remarks;
            set { _remarks = value; OnPropertyChanged(); }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}

